package com.cxb.receiver;

import android.app.ProgressDialog;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.view.WindowManager;

import com.cxb.R;
import com.cxb.utils.CommonUtils;

public class SDCardRemoveReceiver extends BroadcastReceiver {

	@Override
	public void onReceive(Context context, Intent intent) {

		if ("35S".equals(CommonUtils.getInnerVersionName())) {

			final ProgressDialog getServerParamDialog = new ProgressDialog(
					context.getApplicationContext());
			getServerParamDialog.setCanceledOnTouchOutside(false);
			getServerParamDialog.getWindow().setType(
					WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);
			getServerParamDialog.setMessage(context
					.getString(R.string.sd_remove_device_will_reboot));

			getServerParamDialog.show();

			// 1.写入标识，判断 这次重启不发送开关机事件
			// 2.重启

		}

	}

}
